-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add filter:cgolib #1277
Add filter:cgolib #1277
Conversation
@llhhbc Could you send your PR into master branch (v1.1 developing branch)? |
de308c7
to
23ce80f
Compare
@cosmo0920 I have rebase to master branch, and commit again. |
4d3a3d0
to
e1c104e
Compare
@cosmo0920 Can it be merge? |
@edsiper Can it be merge? |
to be reviewed by @wfernandes @jasonkeene |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerning about exporting function symbol naming rule.
On Output Golang proxy, we use CamelCase
names for them.
How about using the following exporting function names?
Golib_init
->GoLibInit
Golib_filter
->GoLibFilter
Golib_exit
->GoLibExit
I've added some nitpicks comments, but other implementation looks good to me.
@edsiper Apologies for the delay. We'll take a look at it soon. |
It is fixed. |
@cosmo0920 @wfernandes @jasonkeene Please check again. |
I will update this filter now |
Sync master
@edsiper I have change code |
Signed-off-by: longhui.li <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I feel that this PR is unnatural because auto-generated cgo.h header is committed by hand.
There's something wrong for me.
@llhhbc Could you rebase off master? Current your branch is not able to build with the recent gcc compilers due to duplicated symbols. |
OK |
@cosmo0920 I have merge the master. |
@nokute78 please manage the review/cleanup/merge of this PR |
How about passing raw message pack between Go and C ? Output plugin of C passes raw messagepack. Line 121 in 0660382
Currently, only string type is supported. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd considered about this once again.
This implementation should be integrated into Fluent Bit Golang plugin mechanism like as:
And filter Golang plugin can be integrated like as (without threaded mechanism):
@cosmo0920 What I need is not the output implemented with go, but the filter implemented with go. At present, fluentbit is fully supported in input and output, but the functions of filter and parse are insufficient, and it is very inconvenient to debug. The |
@nokute78 I'm not sure if this MR can be submitted. Because c and go, the parameters are currently passed through memory sharing, and after use, string is enough to use (because other types, the basic components of fluentbit can be solved), using msgpack has also been considered before, but it may be The cost is a bit big. i can try |
Now, fluent-bit supports Wasm filter instead of Golang filter. Your pull requested feature collides our filter Wasm feature. |
we will keep the Wasm as a preference for now. I appreciate the effort here, however I think its time to close it |
Add a new filter: cgolib.
In this filter, It will call go lib filter by open dynamic lib.
Signed-off-by: lonthui.li [email protected]